/*
 * Read.h
 *
 *  Created on: 03/08/2011
 *      Author: jairo
 */

#ifndef __BILBAO_PROTOCOL_SERIAL_READ_CLASS_H__
#define __BILBAO_PROTOCOL_SERIAL_READ_CLASS_H__

#include "bilbao/protocol/serial/SincronyzedQueue.h"
#include "bilbao/util/SerialPort.h"
#include "bilbao/lang/Thread.h"

namespace bilbao
{
	namespace protocol
	{
		namespace serial
		{
			class Read :
					public lang::Thread
			{
			public:
				Read();
				Read(util::SerialPort*, SincronyzedQueue*);
				virtual ~Read();
				void run();
			private:
				util::SerialPort* _serialPort;
				SincronyzedQueue* _filaComandos;
				bool _stateRead;
			};
		} // namespace serial
	} // namespace protocol
} // namespace bilbao

#endif // __BILBAO_PROTOCOL_SERIAL_READ_CLASS_H__
